﻿<div>
    <RadioGroup @bind-Value="placement">
        <Radio Value="DrawerPlacement.Top">Top</Radio>
        <Radio Value="DrawerPlacement.Right">Right</Radio>
        <Radio Value="DrawerPlacement.Bottom">Bottom</Radio>
        <Radio Value="DrawerPlacement.Left">Left</Radio>
    </RadioGroup>

    <Button Type="ButtonType.Primary" OnClick="open">Open</Button>
    <Drawer OffsetX="200" OffsetY="100" Visible="@visible" Placement="placement" Title='("Basic Drawer")' OnClose="close">
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
    </Drawer>
</div>

@code{

    DrawerPlacement placement = DrawerPlacement.Right;

    bool visible = false;

    void open()
    {
        this.visible = true;
    }

    void close()
    {
        this.visible = false;
    }
}